<template>
	<div class="pl30 pr30">
		<div class="pt10 pb30">
			<div class="pb20">
				<span class="fb">基本信息</span>
			</div>
			<div class="fs14" style="line-height: 45px;">
				<el-row class="border-bottom border-right border-left border-top">
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户姓名</el-col>
				   <el-col :span="6" class="border-right color2 pl20">{{info2.customerName}}</el-col>
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户编号</el-col>
				   <el-col :span="10" class="color2 pl20">{{info2.customerCode || '-'}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户类型</el-col>
				   <el-col :span="6" class="border-right color2 pl20">{{customerTypeProps.customerTypeName}}</el-col>
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户来源</el-col>
				   <el-col :span="10" class="color2 pl20">{{customerTypeProps.opportunityChannelName}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户星级</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.customerStarLevel}}星</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">来源渠道</el-col>
				    <el-col :span="10" class="color2 pl20">{{customerTypeProps.opportunitySourceName}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
					<el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户状态</el-col>
					<el-col :span="6" class="border-right color2 pl20">{{customerTypeProps.customerStatusName}}</el-col>
					<el-col :span="4" class="border-right text-center bg-F5F7FA fb">客户归属</el-col>
					<el-col :span="10" class="color2 pl20">{{info2.businessManagerName}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">生日</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.birthday}}</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">种植作物</el-col>
				    <el-col :span="10" class="color2 pl20">{{info2.cropVariety}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
					<el-col :span="4" class="border-right text-center bg-F5F7FA fb">种植面积</el-col>
					<el-col :span="6" class="border-right color2 pl20">{{info2.cropArea}}亩</el-col>
					<el-col :span="4" class="border-right text-center bg-F5F7FA fb">年农资投入成本</el-col>
					<el-col :span="10" class="color2 pl20">{{info2.cropCost}}元</el-col>
				</el-row>
			</div>	
		</div>
		<div class="pb30">
			<div class="pb20">
				<span class="fb">财务信息</span>
			</div>
			<div class="fs14" style="line-height: 45px;">
				<el-row class="border-bottom border-right border-left border-top">
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">已成交金额</el-col>
				   <el-col :span="6" class="border-right color2 pl20">￥{{info2.dealMoney || 0}}</el-col>
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">已回款金额</el-col>
				   <el-col :span="10" class="color2 pl20">￥{{info2.recycleMoney || 0}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">已成交订单</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.dealOrder || 0}}</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">已退款金额</el-col>
				    <el-col :span="10" class="color2 pl20">￥{{info2.returnMoney || 0}}</el-col>
				</el-row>
			</div> 
		</div>
		<div class="pb30">
			<div class="pb20">
				<span class="fb">系统信息</span>
			</div>
			<div class="fs14" style="line-height: 45px;">
				<el-row class="border-bottom border-right border-left border-top">
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb">系统编号</el-col>
				   <el-col :span="6" class="border-right color2 pl20">{{info2.customerCode || '-'}}</el-col>
				   <el-col :span="4" class="border-right text-center bg-F5F7FA fb"></el-col>
				   <el-col :span="10" class="color2 pl20"></el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">业务经理</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.businessStaffName}}</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">所属部门</el-col>
				    <el-col :span="10" class="color2 pl20">{{info2.deptName}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">前业务经理</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.frontBusinessManagerName}}</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">前所属部门</el-col>
				    <el-col :span="10" class="color2 pl20">{{info2.frontDeptName}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">创建时间</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.createTime}}</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">创建人员</el-col>
				    <el-col :span="10" class="color2 pl20">{{info2.createByName}}</el-col>
				</el-row>
				<el-row class="border-bottom border-right border-left">
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">最后跟进</el-col>
				    <el-col :span="6" class="border-right color2 pl20">{{info2.latestFollowupTime}}</el-col>
				    <el-col :span="4" class="border-right text-center bg-F5F7FA fb">下次跟进</el-col>
				    <el-col :span="10" class="color2 pl20">{{info2.nextFollowUpTime}}</el-col>
				</el-row>
			</div> 
		</div>
	</div>
</template>

<script>
	import { detailedInforMtion } from '@/api/business/customer' 
	export default{
		props:{
			customerTypeProps:{
				type:Object,
				default:{}
			},
			activeName:{
				type:String,
				default:''
			}
		},
		data(){
			return{
				info2:{}
			}
		},
		watch:{
			activeName(){
				let that = this
				if(this.activeName == 'message2'){
					this.detailedInforMtion()
				}
			}
		},
		methods:{
			detailedInforMtion(){
				detailedInforMtion(this.customerTypeProps.userId).then(res=>{
					this.info2 = res.data
				})
			}
		}
	}
</script>

<style>
</style>